package cn.kgc.entity;

import java.util.Date;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.*;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 商品评价(PmsSpuComment)表实体类
 *
 * @author makejava
 * @since 2022-12-05 09:38:33
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "pms_spu_comment")
@SuppressWarnings("serial")
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class PmsSpuComment extends Model<PmsSpuComment> implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id; //主键


    /**
     * sku_id
     **/
    @TableField(value = "sku_id")
    private Long skuId;


    /**
     * spu_id
     **/
    @TableField(value = "spu_id")
    private Long spuId;


    /**
     * 商品名字
     **/
    @TableField(value = "spu_name")
    private String spuName;


    /**
     * 会员昵称
     **/
    @TableField(value = "member_nick_name")
    private String memberNickName;


    /**
     * 星级
     **/
    @TableField(value = "star")
    private Short star;


    /**
     * 会员ip
     **/
    @TableField(value = "member_ip")
    private String memberIp;


    /**
     * 创建时间
     **/
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;


    /**
     * 显示状态[0-不显示，1-显示]
     **/
    @TableField(value = "show_status")
    private Short showStatus;


    /**
     * 购买时属性组合
     **/
    @TableField(value = "spu_attributes")
    private String spuAttributes;


    /**
     * 点赞数
     **/
    @TableField(value = "likes_count")
    private Integer likesCount;


    /**
     * 回复数
     **/
    @TableField(value = "reply_count")
    private Integer replyCount;


    /**
     * 评论图片/视频[json数据；[{type:文件类型,url:资源路径}]]
     **/
    @TableField(value = "resources")
    private String resources;


    /**
     * 内容
     **/
    @TableField(value = "content")
    private String content;


    /**
     * 用户头像
     **/
    @TableField(value = "member_icon")
    private String memberIcon;


    /**
     * 评论类型[0 - 对商品的直接评论，1 - 对评论的回复]
     **/
    @TableField(value = "comment_type")
    private Short commentType;


    @TableLogic
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT)
    private int deleted;  //逻辑删除标志


    @TableField(value = "creationdate", fill = FieldFill.INSERT)
    @JsonIgnore
    private Date creationdate; //创建时间


    @TableField(value = "modifydate", fill = FieldFill.UPDATE)
    @JsonIgnore
    private Date modifydate; //修改时间


    @Version
    private int version;   //版本


}
